import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from "@/components/Home";
import userEdit from "@/components/UserEdit";

Vue.use(Router)

export default new Router({
  routes: [
    // 登录模块
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    // 主页面,登录成功后跳转到主页面
    {
      path:'/home',
      name:'Home',
      component:Home
    },
    // 员工编辑页面
    {
      path:'/userEdit/:id', // 需要传递ID参数
      name:'UserEdit',
      component:userEdit
    }
  ]
})
